<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div id = "layer1">
		<a href="a.jsp">a.jsp</a>
		<p>안녕하세요</p>
		<b><i>이것은 innerHTML 연습입니다. </i></b>
	</div>
	<input type="button" value="innerHTML - 조회" onclick="innerHTMLTest1()">
	<input type="button" value="innerHTML - 변경" onclick="innerHTMLTest2()"/>
	
	<script type="text/javascript" charset="utf-8">
		function innerHTMLTest2(){
			var layer1 = document.getElementById("layer1");
			layer1.innerHTML = "<h2 style='color:blue'>금요일입니다.</h2>";
		}
	
	
	
		function innerHTMLTest1 () {
		  var layer1 = document.getElementById("layer1");
		  var html = layer1.innerHTML;
		  alert(html);
		  html = layer1.outerHTML;
		  alert(html);
		}
	</script>
</body>
</html>